'''def fib(max):
    n,a,b=0,0,1
    while n<max:
        print(b)
        a,b=b,a+b  #t=(b,a+b) a=t[0],b=[1]
        n=n+1
    return "done"

fib(10)
'''
def fib(max):
    n,a,b=0,0,1
    while n<max:
        yield(b)
        a,b=b,a+b  #t=(b,a+b) a=t[0],b=[1]
        n=n+1
    return "done"

f=(fib(10))
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())


